<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="sysDefault"
	content="text/html; charset=utf-8" />
<link
	href="${staticPath}/lib/datetimepicker/0.0.11/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet" type="text/css">
<link href="${staticPath}/lib/chosen/1.1.0/chosen.min.css"
	rel="stylesheet" type="text/css">
<link rel="stylesheet"
	href="${staticPath}/lib/ztree/3.5/css/zTreeStyle/zTreeStyle.css"
	type="text/css">
<script src="${staticPath}/lib/ztree/3.5/js/jquery.ztree.all-3.5.js"
	type="text/javascript"></script>
<script src="${staticPath}/js/jquery-dialog.js" type="text/javascript"></script>

<script type="text/javascript" charset="utf-8" src="${staticPath}/lib/kindeditor/kindeditor.js"></script>
<script src="${staticPath}/lib/jquery/1.9.1/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="${staticPath}/js/jquery-migrate-1.1.1.js"></script> 
<script type="text/javascript">
	
	KE.show({
		id : 'content',
		imageUploadJson : '${staticPath}/lib/kindeditor/jsp/upload_json.jsp',
		fileManagerJson : '${staticPath}/lib/kindeditor/jsp/file_manager_json.jsp',
		allowFileManager : true,
		afterCreate : function(id) {
			KE.event.ctrl(document, 13, function() {
				KE.util.setData(id);
				document.forms['example'].submit();
			});
			KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
				KE.util.setData(id);
				document.forms['example'].submit();
			});
		}
	});
</script>

</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							修改新闻
							 <a class="btn btn-default btn-sm pull-right" role="button"
								href="javascript:void(0)" onclick="history.go(-1)">返回</a>
						</h3>
					</div>
					<div class="panel-body">
						<div class="col-xs-10">
							<!--<div class="panel-body">-->
							<form:form id="newsForm" modelAttribute="selfNews"
								action="${contextPath}/sys/news/selfnews/saveUpdate" method="post"
								class="form-horizontal" role="form">
								<form:hidden path="id" />
								<div class="form-group">
									<div class="col-sm-6">
										<label for="title" class="col-sm-4 control-label">标题:</label>
										<div class="col-sm-8">
											<form:input id="title" path="title" htmlEscape="false"
												class="form-control" />
										</div>
									</div>
									
									<div class="col-sm-6">
										<label for="category" class="col-sm-4 control-label">类别:</label>
										<div class="col-sm-8">
											<form:select name="category" id="category" path="category">
												<option value="0">a</option>
												<option value="1">b</option>
												<option value="2">c</option>
												<option value="3">d</option>
											</form:select>
										</div>
									</div>
								</div>
								<div class="form-group">
									<div class="col-sm-6">
										<label for="createBy" class="col-sm-4 control-label">创建人:</label>
										<div class="col-sm-8">
											<form:input id="createBy" path="createBy" htmlEscape="false"
												class="form-control" readonly="true" />
										</div>
									</div>
									<div class="col-sm-6">
										<label for="createTime" class="col-sm-4 control-label">创建时间:</label>
										<div class="col-sm-8">
											<input id="createTime" name="createTime" type="text"
												readonly="readonly" class="form-control"
												value="<fmt:formatDate value="${selfNews.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>" />
										</div>
									</div>
								</div>
								
								<div class="form-group">
									<div class="col-sm-6">
										<label for="updateBy" class="col-sm-4 control-label">修改人:</label>
										<div class="col-sm-8">
											<form:input id="updateBy" path="updateBy" htmlEscape="false"
												class="form-control" readonly="true" />
										</div>
									</div>
									<div class="col-sm-6">
										<label for="updateTime" class="col-sm-4 control-label">修改时间:</label>
										<div class="col-sm-8">
											<input id="updateTime" name="updateTime" type="text"
												readonly="readonly" class="form-control"
												value="<fmt:formatDate value="${selfNews.updateTime}" pattern="yyyy-MM-dd HH:mm:ss"/>" />
										</div>
									</div>
								</div>
								
								<div class="form-group">
									<div class="col-sm-6">
										<label for="keyWord" class="col-sm-4 control-label">关键字:</label>
										<div class="col-sm-8">
											<form:input id="keyWord" path="keyWord" htmlEscape="false"
												class="form-control" />
										</div>
									</div>								
									<div class="col-sm-6">
										<label for=summary class="col-sm-4 control-label">摘要:</label>
										<div class="col-sm-8">
											<form:textarea id="summary" path="summary" htmlEscape="false"
												class="form-control" />
										</div>
									</div>
								</div>
								
								<div class="form-group">
									<div class="col-sm-6">
										<label for=summary class="col-sm-4 control-label">内容:</label>
											<div class="col-sm-8">
												<textarea id="content" name="content" cols="100" rows="8" style="width:660px;height:550px;">${selfNews.content}</textarea>
											</div>
									</div>		
								</div>
								
									
								<div class="form-group">
									<div class="col-sm-offset-6 col-sm-10">
										<input class="btn btn-primary" type="submit" value="保存" /> 
									</div>
								</div>
							</form:form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>